package com.tianshuo.main;

import com.tianshuo.config.ListenerConfig;
import com.tianshuo.listener.service.OrderService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @ClassName : AnnotationApplicationContextTest
 * @Description : 注解配置spring启动类
 * @Author : tianshuo
 * @Date: 2020-08-20 11:24
 */
public class ListenerAnnotationApplicationContextTest {

	public static void main(String[] args) {
		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ListenerConfig.class);
		OrderService orderService = applicationContext.getBean(OrderService.class);
		orderService.publish();

	}
}

